﻿// Program: AlphaPaint.exe
//
// This non-consumer painting program is a front-end to the SmoothDraw domain.
//
// USAGE
// - Leave Outer color or Inner color fields blank for transparency.
// - Click Copy to store the image on the clipboard in PNG format.  Programs such as MsPaint
//   do not support images that include transparency.
// - Left click on the image to flood fill Inner color with alpha blending.
// - Right click on the image to flood fill Inner color without alpha blending.
//
// OS Support
// - Windows 7 fonts define chess symbols in the fonts Segoe UI and Tahoma.
// - Windows XP does not include chess symbol character definitions.

using System;
using System.Windows.Forms;
using SmoothDraw;

namespace AlphaPaint
{
    static class WinProgram
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault (false);
            Application.Run (new ApController());
        }
    }


    public class ApView
    {
        ApController controller;
        SmoothDrawModel model;

        public ApView (ApController controller, SmoothDrawModel model)
        {
            this.controller = controller;
            this.model = model;

            model.PicChanged += PicInvalidate;
        }

        private void PicInvalidate ()
        {
            controller.picPanel.Invalidate();
        }
    }
}
